/////////////////////////////////////////////////////////////////////////////
/*/	
 *	Creator:		Joshua C. Rouzer
 *	Title:			
 *	Last Edited:	06/11/2013
 *	Summary:		
/*/
/////////////////////////////////////////////////////////////////////////////
#ifndef CANIMINFO_H
#define CANIMINFO_H

#include <string>
#include <Windows.h>
#include "BaseUnit.h"

class CPlayerShip;

struct Frame
{
	int m_nFrame;
	POINT Anchor;
	RECT m_DrawRect;
	RECT m_CollisionRect;
	float m_fTime;
	std::string Trigger;

	bool Triggered;

	void SetFrame(int f, int AX, int AY, int DrawX, int DrawY, int DrawH, int DrawW, 
		int CollX, int CollY, int CollH, int CollW, float time, std::string trig)
	{
		m_nFrame = f;
		Anchor.x = AX;
		Anchor.y = AY;
		SetRect(&m_DrawRect,DrawX,DrawY,DrawW,DrawH);
		SetRect(&m_CollisionRect,CollX,CollY,CollW,CollH);
		m_fTime = time;
		Trigger = trig;
		Triggered = false;
	}
};

class CAnimInfo
{
private:
	int CurrentAnim;
	int CurrentFrame;
	float TimeOnFrame;
	bool isPlaying;
	bool isOver;
	bool Flipped;

	CMovingObject* Owner;
public:
	CAnimInfo(void);
	~CAnimInfo(void);

	void SetCurrAnim(int c);
	void SetCurrFrame(int f);
	void SetTimeOnFrame(float t);
	void SetIsPlaying(bool i);
	void SetFlipped(bool i);
	void SetIsOver(bool i);
	void SetOwner(CMovingObject* o);

	int GetCurrAnim();
	int GetCurrFrame();
	float GetTimeOnFrame();
	bool GetIsPlaying();
	bool GetFlipped();
	bool GetIsOver();
	CMovingObject* GetOwner();
};
#endif